SymbolsABCDEFGHIJKLMNOPQRSTUVWXYZAPDA format conventions for this bookIEEE standard$IEEE Standard 754. See IEEE standardPowerPC NumericsSANE680x0-based Macintosh computersnumerics environmentaccuracyof basic arithmetic operationsANSI X3J11.1arithmetic, IEEE standard
C languageconformance to IEEE 754&computer approximation of real numbersdecimal fractionsdivisionby zero2elementary functions. See transcendental functionsexception handlingexceptional events
exceptionsFPCE technical reportIEEE arithmetic
advantages
advantages
C languageIEEE Standard 854-IEEE standard arithmetic. See IEEE arithmetic
Infinitiesas alternative to stoppinginterval arithmeticinverse operationsMathLibNaNsas alternative to stoppingNCEGNumerical C Extensions Group
advantagesSANE, compared to precisionreal numberscomputer approximationroundingdefinedrounding directioncontrolcompared to PowerPC Numericstranscendental functionsdefinedzerodivision by∞. See Infinities±0. See zerobias of exponents!classes of floating-point numbersdata formatschoosingclasses of numbersdiagramsdiagrams, symbols used indouble formatdouble-double formatprecision ofrange ofsingle formatdenormalized numbers
density ofdouble-double formatdensity of denormalized numbers#density of single-precision numbersdouble formatcompilerdiagramdiagram, symbols used in precisionrangerepresentation of valuesdouble-double formatcompared to extended formatcompilerdiagramdiagram, symbols used ininterpretation of values precisionrangeexponentdefinedextended data type compared to double-double format-floating-point data formats. See data formatsfloating-point numbers
classes of#floating-point values, interpretingflush-to-zero systemsformats. See data formatsfraction fielddefinedgradual underflowIEEE data formats'. See also single format, double formatdata formatsdouble-double formatnegativepositiveinteger types"interpreting floating-point valuesinvalid exceptionsignaling NaN, result ofdouble-double formatquiet signaling!negative Infinity. See Infinitiesnegative zero. See zeronormalized numbers compared to denormalized numbersdouble-double formatNot-a-Number. See NaNsnumbers, classes of!positive Infinity. See Infinitiespositive zero. See zerodata formatsof data formats
quiet NaNsrange of data formats(roundoff error with denormalized numberssign bitsign of zerosignaling NaNssignificandsingle formatcompilerdiagramdiagram, symbols used in precisionrangerepresentation of values$single-precision numbers, density ofsmall valuesand error analysisrepresentingsymbols in format diagramstypes. See data formats underflowgradualvalues, interpreting variable types. See data formats–0 as a resultdouble-double formatsign ofarithmetic operationsautomatic type conversions#function calls, conversions duringconversionsduring expression evaluationexpression evaluation formatminimum evaluation formatsemantic typeevaluation formatminimumwidest needexpression evaluation formatexpression evaluation methodscomparedexamplesminimum evaluation format onlywidest-need evaluation&floating-point expressions, evaluatingminimum evaluation format"compared to widest-need evaluationexamples
operations!subject to arithmetic conversionsexpression evaluationof expression evaluationsemantic typewidest-need evaluationcompared to minimum evaluationexamplesabsolute valueadditioninvalid exception, generatingcomparisonsinvalid exception, generatinginvalid exceptioncopysign functioninvalid exceptioncurrent rounding directiondefault environmentdefault rounding directiondivide-by-zero exceptiondefinedinvalid exception, generatingdownward roundingdefinedenvironmentdefaultenvironmental controlsdescriptions ofdivide-by-zeroinexactinvalidoverflow underflowfabs function+floating-point environment. See environment)floating-point exceptions. See exceptionsintegers, converting to
truncating
exceptionsrounding direction modes. See also rounding directionrounding precision modesinexact exceptionintegers, convertingrounding
to nearesttoward zeroupwardrounding downwarddefined&rounding modes. See rounding directionrounding precision modesrounding to integerrounding to nearest valuerounding toward zerodefinedrounding upwarddefinedinvalid exceptionsquare root operationinvalid exception, generatingtiny resultto-nearest rounding)toward –∞ rounding. See downward rounding'toward +∞ rounding. See upward roundingtoward-zero roundingdefined$truncating floating-point to integerupward roundingrounding towarddecimal to binary conversionsbinary to decimal conversionsdouble-double formatstrings
structuresaccuracy of decimal to binarybetween decimal formatsbetween floating-point formatsbinary to decimaldecimal to binarydouble-double formatdouble-double to decimalfloating-point to integerinexact exceptioninteger to floating-pointoverflow exceptionunderflow exceptionconverting betweendecform structure!decimal data, reading and writingdecimal formatting structuredecimal stringsdecimal structuredecimal to binary conversionsdouble-double formatstrings
structuresdecimal to decimal conversions$converting from double-double formatconverting from single formatdefined"converting to double-double formatconverting to single formatdefinedconverting from double formatconverting from single formatconverting to decimalconverting to double formatconverting to single formatconversions requiredconversionsconverting to integerconversionsconverting to integerconversionsconversions supportedconverting from double formatdefined$converting from double-double formatconverting to double formatdefined"converting to double-double formatstring conversionsconversions– (minus) operator ! !%! (not less or greater than) operator!= (not equal) operator!= (unordered) operator!> (not greater than) operator(!>= (not greater than or equal) operator(less or greater than) operator* (multiply) operator+ (plus) operator/ (divide) operator= (ordered) operator== (equal to) operatordefined> (greater than) operatordefined&>= (greater than or equal to) operatorargument reductionadditiondivisionmultiplication remainderround-to-integersquare rootsubtractionauxiliary functions&comparison operations. See comparisonscomparison operatorsinvolving Infinitiesinvolving NaNsrint functionrint functiondifference operationdefinedequal to operatorconverting to integerfmod function functions auxiliarygreater than operator
comparisondefinedcompilerordered comparisondefinedfunctions supportedoperations supportedorder ofrelational operatorsdefinedremainderl functionremquo functionremquol functionrint functionrintl functionround to integer operationcurrentcomparisonssqrt functionsqrtl functiondefinedsubtraction operationdefinedunordered (comparison)definednan functiondata types, newdouble type. See double formatfloat type. See single format*long double type. See double-double formatcompilercompilercompilerwidening for efficiencydouble type. See double formatdouble_t typedef&in definitions of float_t and double_tfloat type. See single formatcompilerfloat_t typedef
data typesfpclassify macroINFINITY constantisfinite macroisnan macroisnormal macro*long double type. See double-double formatdata types, newNAN constantnan functionPowerPC Numericsnanf functionnanl functioncreatingcompilersignbit macrotagp parameterwidening for efficiencyaccessing the environmentC functionsatomic operationsenvironmental controlscontrolling the environmentC functions accessingC functionsC functions, types restoringcompilersavingcompilersetting (compiler)environmental access switchpurpose, note onC functionsC functionsclearingcompiler
preservingcompilerraisingcompilerrestoring (compiler)savingcompilersettingcompilerspurioustestingcompilerfeclearexcept functionfegetenv function
definition%difference from feholdexcept functionfegetexcept function
definitionwith fesetexcept functionfegetround function
definition exp field sgn field sig fieldC functionsfloor functioncompilerfloor functionfloorl functionformatters, numericformatting outputfixed-style decimalfloating-style decimal fp.h file functionsconversionsnearbyint functionconverting to decimalconverting to floating-pointconverting to stringcompilerconversionsconverting to decimalconverting to floating-pointconverting to stringnearbyint functionnearbyintl functionnum2dec function